Optimal. Leaf size=143 \[ -\frac {a \csc (c+d x)}{d}-\frac {a \csc ^2(c+d x)}{2 d}-\frac {39 a \log (1-\sin (c+d x))}{16 d}+\frac {3 a \log (\sin (c+d x))}{d}-\frac {9 a \log (1+\sin (c+d x))}{16 d}+\frac {a^3}{8 d (a-a \sin (c+d x))^2}+\frac {a^2}{d (a-a \sin (c+d x))}+\frac {a^2}{8 d (a+a \sin (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 143, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2915, 12, 90}
\begin {gather*} \frac {a^3}{8 d (a-a \sin (c+d x))^2}+\frac {a^2}{d (a-a \sin (c+d x))}+\frac {a^2}{8 d (a \sin (c+d x)+a)}-\frac {a \csc ^2(c+d x)}{2 d}-\frac {a \csc (c+d x)}{d}-\frac {39 a \log (1-\sin (c+d x))}{16 d}+\frac {3 a \log (\sin (c+d x))}{d}-\frac {9 a \log (\sin (c+d x)+1)}{16 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 90
Rule 2915
Rubi steps
\begin {align*} \int \csc ^3(c+d x) \sec ^5(c+d x) (a+a \sin (c+d x)) \, dx &=\frac {a^5 \text {Subst}\left (\int \frac {a^3}{(a-x)^3 x^3 (a+x)^2} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^8 \text {Subst}\left (\int \frac {1}{(a-x)^3 x^3 (a+x)^2} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^8 \text {Subst}\left (\int \left (\frac {1}{4 a^5 (a-x)^3}+\frac {1}{a^6 (a-x)^2}+\frac {39}{16 a^7 (a-x)}+\frac {1}{a^5 x^3}+\frac {1}{a^6 x^2}+\frac {3}{a^7 x}-\frac {1}{8 a^6 (a+x)^2}-\frac {9}{16 a^7 (a+x)}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=-\frac {a \csc (c+d x)}{d}-\frac {a \csc ^2(c+d x)}{2 d}-\frac {39 a \log (1-\sin (c+d x))}{16 d}+\frac {3 a \log (\sin (c+d x))}{d}-\frac {9 a \log (1+\sin (c+d x))}{16 d}+\frac {a^3}{8 d (a-a \sin (c+d x))^2}+\frac {a^2}{d (a-a \sin (c+d x))}+\frac {a^2}{8 d (a+a \sin (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.52, size = 86, normalized size = 0.60 \begin {gather*} -\frac {a \csc (c+d x) \, _2F_1\left (-\frac {1}{2},3;\frac {1}{2};\sin ^2(c+d x)\right )}{d}-\frac {a \left (2 \csc ^2(c+d x)+12 \log (\cos (c+d x))-12 \log (\sin (c+d x))-4 \sec ^2(c+d x)-\sec ^4(c+d x)\right )}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.28, size = 129, normalized size = 0.90
method | result | size |
derivativedivides | \(\frac {a \left (\frac {1}{4 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{4}}+\frac {3}{4 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{2}}-\frac {3}{2 \sin \left (d x +c \right )^{2}}+3 \ln \left (\tan \left (d x +c \right )\right )\right )+a \left (\frac {1}{4 \sin \left (d x +c \right ) \cos \left (d x +c \right )^{4}}+\frac {5}{8 \sin \left (d x +c \right ) \cos \left (d x +c \right )^{2}}-\frac {15}{8 \sin \left (d x +c \right )}+\frac {15 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(129\) |
default | \(\frac {a \left (\frac {1}{4 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{4}}+\frac {3}{4 \sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{2}}-\frac {3}{2 \sin \left (d x +c \right )^{2}}+3 \ln \left (\tan \left (d x +c \right )\right )\right )+a \left (\frac {1}{4 \sin \left (d x +c \right ) \cos \left (d x +c \right )^{4}}+\frac {5}{8 \sin \left (d x +c \right ) \cos \left (d x +c \right )^{2}}-\frac {15}{8 \sin \left (d x +c \right )}+\frac {15 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(129\) |
risch | \(-\frac {i \left (-6 i a \,{\mathrm e}^{8 i \left (d x +c \right )}+15 a \,{\mathrm e}^{9 i \left (d x +c \right )}-14 i a \,{\mathrm e}^{6 i \left (d x +c \right )}+28 a \,{\mathrm e}^{7 i \left (d x +c \right )}+14 i a \,{\mathrm e}^{4 i \left (d x +c \right )}-22 a \,{\mathrm e}^{5 i \left (d x +c \right )}+6 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+28 a \,{\mathrm e}^{3 i \left (d x +c \right )}+15 a \,{\mathrm e}^{i \left (d x +c \right )}\right )}{4 \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2} \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{4} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{2} d}-\frac {9 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}-\frac {39 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}+\frac {3 a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}\) | \(218\) |
norman | \(\frac {-\frac {a}{8 d}-\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d}+\frac {13 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {5 a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {5 a \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {5 a \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {13 a \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {a \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {a \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {21 a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {21 a \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {27 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {27 a \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+\frac {3 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {39 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}-\frac {9 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(305\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 127, normalized size = 0.89 \begin {gather*} -\frac {9 \, a \log \left (\sin \left (d x + c\right ) + 1\right ) + 39 \, a \log \left (\sin \left (d x + c\right ) - 1\right ) - 48 \, a \log \left (\sin \left (d x + c\right )\right ) + \frac {2 \, {\left (15 \, a \sin \left (d x + c\right )^{4} - 3 \, a \sin \left (d x + c\right )^{3} - 22 \, a \sin \left (d x + c\right )^{2} + 4 \, a \sin \left (d x + c\right ) + 4 \, a\right )}}{\sin \left (d x + c\right )^{5} - \sin \left (d x + c\right )^{4} - \sin \left (d x + c\right )^{3} + \sin \left (d x + c\right )^{2}}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 294 vs.
\(2 (136) = 272\).
time = 0.40, size = 294, normalized size = 2.06 \begin {gather*} \frac {30 \, a \cos \left (d x + c\right )^{4} - 16 \, a \cos \left (d x + c\right )^{2} + 48 \, {\left (a \cos \left (d x + c\right )^{4} - a \cos \left (d x + c\right )^{2} - {\left (a \cos \left (d x + c\right )^{4} - a \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) - 9 \, {\left (a \cos \left (d x + c\right )^{4} - a \cos \left (d x + c\right )^{2} - {\left (a \cos \left (d x + c\right )^{4} - a \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 39 \, {\left (a \cos \left (d x + c\right )^{4} - a \cos \left (d x + c\right )^{2} - {\left (a \cos \left (d x + c\right )^{4} - a \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (3 \, a \cos \left (d x + c\right )^{2} + a\right )} \sin \left (d x + c\right ) - 6 \, a}{16 \, {\left (d \cos \left (d x + c\right )^{4} - d \cos \left (d x + c\right )^{2} - {\left (d \cos \left (d x + c\right )^{4} - d \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.58, size = 125, normalized size = 0.87 \begin {gather*} -\frac {36 \, a \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) + 156 \, a \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - 192 \, a \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) - \frac {4 \, {\left (9 \, a \sin \left (d x + c\right ) + 11 \, a\right )}}{\sin \left (d x + c\right ) + 1} + \frac {27 \, a \sin \left (d x + c\right )^{4} + 74 \, a \sin \left (d x + c\right )^{3} - 141 \, a \sin \left (d x + c\right )^{2} + 32 \, a}{{\left (\sin \left (d x + c\right )^{2} - \sin \left (d x + c\right )\right )}^{2}}}{64 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 9.31, size = 134, normalized size = 0.94 \begin {gather*} \frac {3\,a\,\ln \left (\sin \left (c+d\,x\right )\right )}{d}-\frac {39\,a\,\ln \left (\sin \left (c+d\,x\right )-1\right )}{16\,d}-\frac {9\,a\,\ln \left (\sin \left (c+d\,x\right )+1\right )}{16\,d}-\frac {\frac {15\,a\,{\sin \left (c+d\,x\right )}^4}{8}-\frac {3\,a\,{\sin \left (c+d\,x\right )}^3}{8}-\frac {11\,a\,{\sin \left (c+d\,x\right )}^2}{4}+\frac {a\,\sin \left (c+d\,x\right )}{2}+\frac {a}{2}}{d\,\left ({\sin \left (c+d\,x\right )}^5-{\sin \left (c+d\,x\right )}^4-{\sin \left (c+d\,x\right )}^3+{\sin \left (c+d\,x\right )}^2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________